package router

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func RedirectRoute(r gin.IRouter) {
	//重定向
	r.GET("/baidu", func(c *gin.Context) {
		c.Redirect(http.StatusMovedPermanently, "https://baidu.com")
	})

	r.GET("/toutiao", func(c *gin.Context) {
		c.Redirect(http.StatusMovedPermanently, "https://toutiao.com")
	})
}
